import { createRouter, createWebHashHistory } from 'vue-router'
const router = createRouter({
  history: createWebHashHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      redirect: '/home',
    },
    {
      path: '/home',
      component: () => import('../pages/HomePage.vue'),
    },
    {
      path: '/cart',
      component: () => import('../pages/ShoppingCart.vue'),
    },
    {
      path: '/mine',
      component: () => import('../pages/MinePage.vue'),
    },
    {
      path: '/order',
      component: () => import('../pages/MyOrder.vue'),
    },
    {
      path: '/store',
      component: () => import('../pages/StorePage.vue'),
    },
    {
      path: '/createorder',
      component: () => import('../pages/CreateOrder.vue'),
    },
    {
      path: '/address',
      component: () => import('../pages/Address.vue'),
    },
    {
      path: '/addressedit',
      component: () => import('../pages/AddressEdit.vue'),
    },
    {
      path: '/login',
      component: () => import('../pages/Login.vue'),
    },
    {
      path: '/register',
      component: () => import('../pages/Register.vue'),
    },
    {
      path: '/userinfoedit',
      component: () => import('../pages/UserInfoEdit.vue'),
    },
  ]
})

export default router
